package com.xxlie.shop.service;

import com.xxlie.auth.domain.User;
import com.xxlie.core.model.Page;
import com.xxlie.shop.domain.Feedback;

import java.util.Date;
import java.util.List;

public interface FeedbackService {
    /**
     * 保存意见反馈
     *
     * @param feedback
     */
    Feedback save(Feedback feedback);

    /**
     * 根据主键ID删除意见反馈
     *
     * @param id
     */
    void delete(Long id);

    /**
     * 根据主键更新意见反馈
     *
     * @param feedback
     */
    void update(Feedback feedback);

    /**
     * 根据主键ID查询意见反馈
     *
     * @param id
     * @return
     */
    Feedback findOne(Long id);

    /**
     * 分页查询意见反馈列表
     *
     * @param page
     * @param feedback
     * @return
     */
    Page<Feedback> findAll(Page<Feedback> page, Feedback feedback);

    List<Feedback> findAllByUserAndCreateDateGreaterThanEqual(User user, Date createStartDate);
}
